The Query Chart Viewer displays query results in a chart, which can be set to a range of sizes, skins, and chart types.
Designing queries for Query Chart Viewer
The Query Chart Viewer can render any existing query, but you will get the best results by following these guidelines on how to design queries specifically for use with this iPart:
■ Queries: The queries you create for the iPart should be structured so that the results are appropriate for charting. For example, if you want the chart to display the total sales per salesperson, then the source query should be written using the Sum function in IQA.
■ Query Display Columns: Each property you select on the Display tab in IQA is available in the iPart’s configuration page as a Data column display option. Note, however, that you can only select two properties to be displayed in the iPart.
■ Aliases: In your source query, enter an Alias for the Display properties you plan to show in the iPart. Relying on the default labels may not be sufficient, especially when your query uses multiple joined sources or custom SQL expressions. If the query does not display as you expect, using an Alias often resolves the issue.
■ Sorting: You can sort the query results displayed in your chart in ascending or descending order. To sort your results, edit your source query and, from the Sorting tab, add the property to be sorted.
■ Labels: The labels on your chart’s x-axis may overlap if there are too many data points or if the labels are too long. You may be able to improve the display through a few methods. In the iPart, you can expand the width of the chart or change the label angle. In the query, you can try to reduce the number of data points.
■ Dates: For dates to display correctly, you must cast them as float data types with an offset of 2. You can do this in IQA from the Custom SQL Expression section of the Display tab. For example, if you want to display the OrderDate property in your chart, add the following expression: CAST(OrderDate AS FLOAT) + 2. Then, when you select this property from the Data column list in your iPart, set the Data column format to a date format.
■ Integers: If integers display incorrectly in your chart, cast the column to a data type of INT in the Custom SQL Expression section of IQA’s Display tab. For example: CAST (OrderCount AS INT).
Chart Types
You can display the following types of charts in the Query Chart Viewer iPart.
|
Chart Type |
Example |
|
Area - Displays data in an area filled with color to illustrate trends. For example, create an area chart that shows a member’s giving history over time. Note: You can only display one area of data in the iMIS Area chart. |
|
|
Bar - Horizontal - Displays sets of data with horizontal rectangular bars for comparison. For example, create a horizontal bar chart that shows the number of donations received by each of your fundraising campaigns. |
|
|
Bar - Vertical - Displays sets of data with vertical rectangular bars for comparison. For example, create a vertical bar chart that shows the distribution of your members across states. |
|
|
Bubble - Displays data as a series of bubbles. For example, create a bubble chart to show the total number of function registrations for an upcoming conference. Note: You cannot assign a size value to the bubbles in the iMIS Bubble chart. |
|
|
Line - Displays data as a series of data points connected by a line to illustrate trends. For example, create a line chart that shows a member’s giving history over time. |
|
|
Pie - Displays data in a circular chart divided into sections to illustrate proportion. For example, create a pie chart that shows the proportions of your members by country. |
|